load FAMPanes,ResetTabs

! -------------- Start Template -----------------
DropTypes INDI,INDICtrl
GoSub ResetTabs,0
GoSub FAMPanes,"Events"

! --------- Events --------------
cell GroupBox,local("Events")
  width -1

  newline
  ClearTabs
  #lineSkip=2
  #cellSkip=2
  #tableWidth=#rightMargin$-#rightSkip-#hpos$-21
  #cellWidth=(#tableWidth-3*#cellSkip-20)/3
  #nameWidth=#cellWidth
  if #cellWidth>175
    #nameWidth=175
    #cellWidth=(3*#cellWidth-175)/2
  endif
  SetTab #habs$+#nameWidth,#habs$+#nameWidth+32,#habs$+#nameWidth+32+#habs$+.8*#cellWidth,#habs$+#tableWidth-22,#habs$+#tableWidth
  #first="yes"

  #tstart=#vpos$
  ShowAll FAMEvntsOrdns

  #lineSkip=#lineSkip$
  #cellSkip=#cellSkip$

  newline
  if #vpos$=#tstart
    newline -3
  endif
  cell LinkButton
  image "plus"
  set width 24 border no
  MenuLink "Attach Event/Attribute"
  help local("Click to add an event")

  cell LinkButton "-"
  image "minus"
  set width 24 border no
  MenuLink "Detach Event/Attribute/Link"
  help local("Click to remove an event")

  hskip 10
  cell LinkButton local("Copy Event")
  set border shadowlesssquare
  MenuLink "Copy Event"
  help local("Click to copy event with text selection bar")
  sizetofit 10

  hskip 3
  cell LinkButton local("Paste Event")
  set border shadowlesssquare
  MenuLink "Paste Event"
  help local("Click to paste previously copied event to this record")
  sizetofit 10

  hskip 3
  cell LinkButton local("Map")
  set border shadowlesssquare
  set ScriptLink "Maps/EventPlaces" ScriptType "system"
  help local("Click to map the events for this record")
  sizetofit 10
  
EndGroup
GoSub ResetTabs,0

hideexcess
